package com.droidclaimsurveyor.bl;

import android.content.Context;

import com.droidclaimsurveyor.dto.*;
import com.droidclaimsurveyor.helper.asyntask.ICompleteListener;
import com.droidclaimsurveyor.helper.service.DroidClaimWebService;
import com.droidclaimsurveyor.helper.service.DroidCliamFileUploadService;

/*
 AuthenCustomerResultDto AuthenCustomer(AuthenCustomerDto AuthenCustomer)
 ClaimRequestResultDto AddClaimRequest(ClaimRequestDto ClaimRequest);
 List<ClaimInfoDto> GetAllClaimInfoForCustomer(SessionPkDto SessionPk);
 boolean Logout(SessionPkDto SessionPk);
 CustomerDto GetCustomer();
 ClaimInfoForCustomerResultDto GetClaimInfoForCustomer(ClaimInfoPKDto ClaimInfoPK);
 AuthenSurveyorResultDto AuthenSurveyor(AuthenSurveyorDto AuthenSurveyor);
 UpdateSurveyorStatusResultDto UpdateSurveyorStatus(SurveyorStatusDto Status);
 UpdateSurveyorLocationResultDto UpdateSurveyorLocation(SurveyorLocationDto Status);
 SurveyorLocationResultDto GetSurveyorLocation(ClaimInfoPKDto CliamInfoPk);
 ClaimInfoForSurveyorResultDto GetClaimInfoForSurveyor(ClaimInfoPKDto CliamInfoPk);
 DenyMessageResultDto SendDenyMessage(DenyMessageDto DenyMessage);
 ClaimIdResultDto UpdateClaim(UpdateClaimInfoDto UpdateClaimInfo);
 */

public class DroidClaimBlService {
	private ICompleteListener listener;

	public DroidClaimBlService(ICompleteListener listener) {
		this.listener = listener;
	}

	public String AuthenCustomer(AuthenCustomerBlDto param) {
		AuthenCustomer method = new AuthenCustomer();
		method.setParameter(param);
		DroidClaimWebService<Void, AuthenCustomerResultBlDto> ws = new DroidClaimWebService<Void, AuthenCustomerResultBlDto>(
				(Context) listener, "Call AuthenCustomer");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String AddClaimRequest(ClaimRequestBlDto param) {
		AddClaimRequest method = new AddClaimRequest();
		method.setParameter(param);
		DroidClaimWebService<Void, ClaimRequestResultBlDto> ws = new DroidClaimWebService<Void, ClaimRequestResultBlDto>(
				(Context) listener, "Call AddClaimRequest");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String GetAllClaimInfoForCustomer(SessionPkBlDto param) {
		GetAllClaimInfoForCustomer method = new GetAllClaimInfoForCustomer();
		method.setParameter(param);
		DroidClaimWebService<Void, AllClaimInfoForCustomerResultBlDto> ws = new DroidClaimWebService<Void, AllClaimInfoForCustomerResultBlDto>(
				(Context) listener, "Call GetAllClaimInfoForCustomer");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String GetClaimInfoForCustomer(ClaimInfoPKBlDto param) {
		GetClaimInfoForCustomer method = new GetClaimInfoForCustomer();
		method.setParameter(param);
		DroidClaimWebService<Void, ClaimInfoForCustomerResultBlDto> ws = new DroidClaimWebService<Void, ClaimInfoForCustomerResultBlDto>(
				(Context) listener, "Call GetClaimInfoForCustomer");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String Logout(SessionPkBlDto param) {
		Logout method = new Logout();
		method.setParameter(param);
		DroidClaimWebService<Void, Boolean> ws = new DroidClaimWebService<Void, Boolean>(
				(Context) listener, "Call Logout");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String GetCustomer() {
		return "";
	}

	public String AuthenSurveyor(AuthenSurveyorBlDto param) {
		AuthenSurveyor method = new AuthenSurveyor();
		method.setParameter(param);
		DroidClaimWebService<Void, AuthenSurveyorResultBlDto> ws = new DroidClaimWebService<Void, AuthenSurveyorResultBlDto>(
				(Context) listener, "Call AuthenSurveyor");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String UpdateSurveyorStatus(SurveyorStatusBlDto param) {
		UpdateSurveyorStatus method = new UpdateSurveyorStatus();
		method.setParameter(param);
		DroidClaimWebService<Void, UpdateSurveyorStatusResultBlDto> ws = new DroidClaimWebService<Void, UpdateSurveyorStatusResultBlDto>(
				(Context) listener, "Call UpdateSurveyorStatus");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String UpdateSurveyorLocation(SurveyorLocationBlDto param) {
		UpdateSurveyorLocation method = new UpdateSurveyorLocation();
		method.setParameter(param);
		DroidClaimWebService<Void, UpdateSurveyorLocationResultBlDto> ws = new DroidClaimWebService<Void, UpdateSurveyorLocationResultBlDto>(
				(Context) listener, "");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String GetSurveyorLocation(ClaimInfoPKBlDto param) {
		GetSurveyorLocation method = new GetSurveyorLocation();
		method.setParameter(param);
		DroidClaimWebService<Void, SurveyorLocationResultBlDto> ws = new DroidClaimWebService<Void, SurveyorLocationResultBlDto>(
				(Context) listener, "Call GetSurveyorLocation");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String GetClaimInfoForSurveyor(ClaimInfoPKBlDto param) {
		GetClaimInfoForSurveyor method = new GetClaimInfoForSurveyor();
		method.setParameter(param);
		DroidClaimWebService<Void, ClaimInfoForSurveyorResultBlDto> ws = new DroidClaimWebService<Void, ClaimInfoForSurveyorResultBlDto>(
				(Context) listener, "Call GetClaimInfoForSurveyor");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String SendAcceptMessage(AcceptMessageBlDto param) {
		SendAcceptMessage method = new SendAcceptMessage();
		method.setParameter(param);
		DroidClaimWebService<Void, AcceptMessageResultBlDto> ws = new DroidClaimWebService<Void, AcceptMessageResultBlDto>(
				(Context) listener, "Call SendAcceptMessage");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String SendDenyMessage(DenyMessageBlDto param) {
		SendDenyMessage method = new SendDenyMessage();
		method.setParameter(param);
		DroidClaimWebService<Void, DenyMessageResultBlDto> ws = new DroidClaimWebService<Void, DenyMessageResultBlDto>(
				(Context) listener, "Call SendDenyMessage");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String UpdateClaim(UpdateClaimInfoBlDto param) {
		UpdateClaim method = new UpdateClaim();
		method.setParameter(param);
		DroidClaimWebService<Void, ClaimIdResultBlDto> ws = new DroidClaimWebService<Void, ClaimIdResultBlDto>(
				(Context) listener, "Call UpdateClaim");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}

	public String UploadFile(UploadFileListDto param) {
		UploadFile method = new UploadFile();
		method.setParameter(param);
		DroidCliamFileUploadService<Void, UploadFileResultDto> ws = new DroidCliamFileUploadService<Void, UploadFileResultDto>(
				(Context) listener, "Call UploadFile");
		ws.setWebServiceMethod(method);
		ws.setTaskCompletionListener(listener);
		ws.execute();

		return method.getName();
	}
}
